package com.study.modules.rabbitmq.testSimple;

import com.study.common.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/rabbitmq/simpleMq")
public class SimpleMqMsgSenderController {
    @Autowired
    private SimpleMqSenderService simpleMqSenderService;

    /**
     * 发送简易消息
     *
     * @return ok
     */
    @GetMapping("/send")
    public R sendMsg(@RequestParam String msg) {
        simpleMqSenderService.sendMsg(msg);
        return R.ok();
    }

}
